home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/unix/c/RCS/link,v $
- * $Date: 1996/10/30 21:59:01 $
- * $Revision: 1.2 $
- * $State: Rel $
- * $Author: unixlib $
- *
- * $Log: link,v $
- * Revision 1.2 1996/10/30 21:59:01 unixlib
- * Massive changes made by Nick Burret and Peter Burwood.
- *
- * Revision 1.1 1996/04/19 21:35:27 simon
- * Initial revision
- *
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id: link,v 1.2 1996/10/30 21:59:01 unixlib Rel $";
-
- #include <errno.h>
- #include <unistd.h>
- #include <sys/os.h>
-
- int
- link (const char *origfile, const char *newfile)
- {
- _kernel_oserror *e;
- char *ofile, *nfile;
-
- ofile = __uname ((char *)origfile, 0);
- nfile = __uname ((char *)newfile, 1);
-
- if (e = os_fsctrl (25, ofile, nfile, 0))
- {
- __seterr (e);
- return (-1);
- }
- return (0);
- }
-